< previous page page_402 next page >

Page 402
After building the menu, enter the following code for the Exit menu item:
Private Sub mnuFileExit_Click()
    cmdExit_Click   ' do the exit!
End Sub
This code calls the existing routine that handles the program exit.
Now you need to add the line of code that calls the new form you are going to create. Enter the following code for the State/Prov menu item:
Private Sub mnuListStProv_Click()
    frmStProv.Show 1
End Sub
This code calls the new form and forces it to display as a modal form. Because it is modal, users cannot change the focus within their project until they safely exit this form.
Building the State/Province List Form
Now that the housekeeping is done, you can build the new form. Use Table 10.3 and Figure 10.6 as guides as you lay out the new validation form.
Table 10.3. Controls for the State/Province list form.
ControlPropertySetting
VB.FormNamefrmStProv
Caption"State/Province Validation Table"
ClientHeight2220
ClientLeft60
ClientTop345
ClientWidth5895
StartUpPosition3 'Windows Default
VB.CommandButtonNamecmdBtn
Index0
VB.TextBoxNameText2
Height255
Left1440
Top540
Width2775

(table continued on next page)

 
< previous page page_402 next page >

If you like this book, buy it!